//
//  UIBarButtonItem+NavBarItem.m
//  StaffTax
//
//  Created by 侯伟 on 2020/6/19.
//  Copyright © 2020 侯伟. All rights reserved.
//

#import "UIBarButtonItem+NavBarItem.h"

@implementation UIBarButtonItem (NavBarItem)

+(instancetype)buttonItemWithTitle:(NSString*)title target:(id)target sel:(SEL)sel{
    
    UIButton* itemBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [itemBtn setTitle:title forState:UIControlStateNormal];
    [itemBtn setTitleColor:COLOR_THEME forState:UIControlStateNormal];
    [itemBtn addTarget:target action:sel forControlEvents:UIControlEventTouchUpInside];
    itemBtn.titleLabel.font = FONT(16);
    
    UIBarButtonItem* btnItem = [[UIBarButtonItem alloc] initWithCustomView:itemBtn];
    return btnItem;
}

@end
